package csdn_math;

import java.time.Instant;
import java.util.Date;

public class Test10 {
    public static void main(String[] args) {
        //Instant->Date
        Instant now= Instant.now();
        Date date=Date.from(now);
        System.out.println(date);
        //Date->Instant
        Date date1=new Date();
        Instant instant=date1.toInstant();
        System.out.println(instant);
    }
}
